package basic;

import java.util.Scanner;

public class While2 {

	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		float sum = 0;
		 do{
			int no = sc.nextInt();
			float price = sc.nextFloat();
			int num = sc.nextInt();
			System.out.println(no +" "+price+"元"+"数量"+num);
			sum = sum + price *num;
		}while(!(sc.next().equals(new String("s"))));
		 System.out.println(sum);
		 sc.close();
	}
	
}
